import request from '@/config/axios'

export type ProjectFileVO = {
  fileName: string,
  size: string,
  type: string,
  username: string,
  createDate: string,
  remark: string,
}

export const getProjectFilePage = (params: PageParam): Promise<{
  total: number,
  list: ProjectFileVO[]
}> => request.get({
  url: '/business/project/file/page',
  params
})
export const getProjectFile = (id: number): Promise<ProjectFileVO> => request.get({
  url: `/business/project/file/${id}`
})

export const delProjectFileList = (ids: number[]): Promise<ProjectFileVO> => request.get({
  url: `/business/project/file/delete`,
  params: {ids: ids.join(',')}
})
export const createProjectFile = (data: ProjectFileVO) => request.post({
  url: `/business/project/file/create`,
  data
})
export const updateProjectFile = (data: ProjectFileVO) => request.post({
  url: `/business/project/file/update`,
  data
})

